home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / spoc88 / cengn / modif-c.c < prev   
Text File  |  1988-05-10  |  1KB  |  53 lines

  1. /************************************************************
  2. MODIF-C.C - by Jake Richter
  3.  
  4.     Displays all C source files in the current directory
  5. that have their archive bits set.
  6.  
  7. ************************************************************/
  8. #include <stdio.h>
  9. #include <dos.h>
  10. #include <dir.h>
  11.  
  12. /************************************************************
  13.                     Program Definitions
  14. ************************************************************/
  15. #define FALSE       0
  16. #define TRUE        !FALSE
  17. typedef struct ffblk FFBLK;
  18.  
  19. /************************************************************
  20.                         Externals
  21. ************************************************************/
  22. extern  void  SearchEngine();
  23.  
  24. /************************************************************
  25.   void DisplayModC()
  26.  
  27.     This routine is called once for every C source file
  28. in the current directory. It displays only those C files that
  29. have their Archive attribute bit set.
  30. ************************************************************/
  31. void    DisplayModC(searchRec)
  32. FFBLK   *searchRec;
  33. {
  34.  
  35.   if (searchRec->ff_attrib & FA_ARCH)
  36.     printf("%s\n", searchRec->ff_name);
  37.  
  38.   return;
  39. }
  40.  
  41. /************************************************************
  42.   main()
  43.  
  44.     Here we make the call to SearchEngine.
  45.  
  46. ************************************************************/
  47. main()
  48. {
  49.  
  50.   SearchEngine("*.C", 0, DisplayModC);
  51.   exit(0);
  52. }
  53.